﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Forum.Filters
{
    public class LogAttribute : ActionFilterAttribute
    {
        public override void OnActionExecuting(ActionExecutingContext filterContext)
        {
            File.AppendAllText(@"C:\tmp\log.txt", filterContext.ActionDescriptor.ControllerDescriptor.ControllerName + " " + filterContext.ActionDescriptor.ActionName + Environment.NewLine);
        }
        //public override void OnActionExecuted(ActionExecutingContext filterContext)
        //{
        //    base.OnResultExecuted(filterContext);
        //}
    }
}